//
//  expertCell.m
//  ILiangCang
//
//  Created by ZX on 16-4-19.
//  Copyright (c) 2016年 CRQ. All rights reserved.
//

#import "expertCell.h"
#import "Masonry.h"

@implementation expertCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self)
    {
        
        self.backgroundColor = [UIColor colorWithRed:50.0/255 green:50.0/255 blue:50.0/255 alpha:1];
        
        _bg = [[UIImageView alloc]init];
        [self addSubview:_bg];
        //        CGFloat a =self.height/_bg.frame.height*self.width;
        [_bg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.offset(0);
            make.bottom.mas_equalTo(self.mas_bottom).with.offset(-30);
        }];
        
        _nameLabel = [[UILabel alloc]init];
        _nameLabel.textColor = [UIColor whiteColor];
        _nameLabel.font = [UIFont systemFontOfSize:12];
        [self addSubview:_nameLabel];
        [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(_bg.mas_bottom);
            make.left.mas_equalTo(self.mas_left);
            make.height.mas_equalTo(15);
        }];
        
        _descLabel = [[UILabel alloc]init];
        _descLabel.textColor = [UIColor colorWithRed:145.0/255 green:200.0/255 blue:250.0/255 alpha:1];
        _descLabel.font = [UIFont systemFontOfSize:11];
        [self addSubview:_descLabel];
        [_descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(_nameLabel.mas_bottom);
            make.left.mas_equalTo(self.mas_left);
            make.height.mas_equalTo(15);
            make.width.mas_equalTo(self.mas_width);
        }];

        
        
        
        
    }
    
    return self;
}

@end
